import { findAllByDisplayValue } from '@testing-library/dom';
import React, { Component } from 'react';

class Navbar extends Component {
	static defaultProps =  {
		leftValue: '<',
		rightValue: '菜单'
	}
	render() {
		const { children, onLeftClick, onRightClick, leftValue, rightValue } = this.props
		return (
			<div style={{
				display: 'flex',
				justifyContent: 'space-between',
				alignItems: 'center',
				height: 36,
				padding: '0 10px',
				background: 'skyblue'
			}}>
				<div onClick={ onLeftClick  } >{ leftValue }</div>
				{ children }
				<div onClick={ onRightClick  }>{ rightValue }</div>
			</div>
		);
	}
}

export default Navbar;
